<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="css/mui.min.css">
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <button type="button" id="back" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
				<span class="mui-icon mui-icon-left-nav" onclick="closeme()"></span>
			</button>
	      	<h1 class="mui-title">湖北省 武汉市</h1>
	    </header>
		<div class="mui-content"></div>
	</body>
	<script src="js/mui.min.js"></script>
	<script type="text/javascript">
		//启用双击监听
		mui.init({
			gestureConfig:{
				doubletap:true
			},
			subpages:[{ 
				url:'pullrefresh_sub1.html',
				id:'pullrefresh_sub1.html',
				styles:{
					top: '45px',
					bottom: '0px', 
				},
			}] 
		});
		var contentWebview = null;
		document.querySelector('header').addEventListener('doubletap',function () {
			if(contentWebview==null){
				contentWebview = plus.webview.currentWebview().children()[0];
			}
			contentWebview.evalJS("mui('#pullrefresh').pullRefresh().scrollTo(0,0,100)");
		});
		// H5 plus事件处理
		function plusReady(){
		}
		if(window.plus){
		plusReady();
		}else{
		document.addEventListener("plusready",plusReady,false);
		}
		
		// 关闭自身窗口
		function closeme(){
			var ws=plus.webview.currentWebview();
			plus.webview.close(ws);
			//处理view的后退与webview后退
			var oldBack = $.back;
			$.back = function() {
				if (viewApi.canBack()) { //如果view可以后退，则执行view的后退
					viewApi.back();
				} else { //执行webview后退
					oldBack();
				}
			};
		}
	</script>

</html>